#include <iostream>
#include <stdlib.h>
#include <algorithm>
#include <cstring>
#include <cmath>
#include <stdlib.h>
#include <iomanip>
int main()
{
    int n;
    std::cin>>n;
    for(int row = 0; row < n; row++)
    {
        int m;
        std::cin>>m;
        int *s = new int[m];
        for(int i = 0; i < m; i++)
            std::cin>>s[i];
        std::sort(s, s+m);
        for(int i = 0; i < m-1; i++)
            std::cout<<s[i]<<" ";
        std::cout<<s[m-1]<<std::endl;

        delete []s;
    }
    return 0;
}
